﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:behaviors="clr-namespace:Store.WP7.Framework.Interactions;assembly=Store.WP7.Framework">

    <DataTemplate x:Key="ProductSummaryDataTemplate">
        <Grid Background="{StaticResource ItemBackgroundBrush}"
              Height="132"
              Width="402"
              Margin="0,0,0,16">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="12" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <Grid Grid.Column="0"
                  Margin="12,12,0,18"
                  HorizontalAlignment="Center"
                  VerticalAlignment="Center">

                <Rectangle Width="100"
                           Fill="{StaticResource AccentBrushDark}"
                           HorizontalAlignment="Left" />
                <Rectangle Width="100"
                           Height="100"
                           Fill="{StaticResource AccentBrushLight}"
                           HorizontalAlignment="Left"
                           Margin="6,6,-6,-6" />
                <Image Source="{Binding PictureUrl}"
                       HorizontalAlignment="Right"
                       Margin="6,6,-6,-6" />
            </Grid>
            
            <Grid Grid.Column="2">
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>

                <TextBlock x:Name="ProductTitle"
                           behaviors:ContinuumAnimation.IsContinuumItem="True"
                           Grid.Row="0"
                           Text="{Binding Title, Converter={StaticResource ToUpperConverter}}"
                           TextWrapping="Wrap"
                           FontSize="26"
                           Foreground="{StaticResource ForegroundBrush}"
                           FontFamily="Segoe WP Black"
                           Margin="12,6,12,0"
                           TextTrimming="WordEllipsis" />
                
                <Border Grid.Row="1"
                        HorizontalAlignment="Right"
                        Background="{StaticResource AccentBrushLight}"
                        Padding="5,3"
                        Margin="0,0,-5,-5"
                        VerticalAlignment="Bottom">
                    <TextBlock Text="{Binding Price}"
                               TextWrapping="Wrap"
                               Style="{StaticResource PhoneTextLargeStyle}"
                               Foreground="White"
                               FontFamily="Segoe WP Black"
                               FontSize="26.667" />
                </Border>
            </Grid>
        </Grid>
    </DataTemplate>

    <DataTemplate x:Key="ProductOrderSummaryDataTemplate">
        <Grid Background="{StaticResource ItemBackgroundBrush}"
              Margin="0,0,0,16"
              Width="432">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="12" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <Grid Grid.Column="0"
                  Margin="12,12,0,18"
                  HorizontalAlignment="Center"
                  VerticalAlignment="Center">

                <Rectangle Width="100"
                           Fill="{StaticResource AccentBrushDark}"
                           HorizontalAlignment="Left" />
                <Rectangle Width="100"
                           Height="100"
                           Fill="{StaticResource AccentBrushLight}"
                           HorizontalAlignment="Left"
                           Margin="6,6,-6,-6" />
                <Image Source="{Binding PictureUrl}"
                       HorizontalAlignment="Right"
                       Margin="6,6,-6,-6" />
            </Grid>

            <Grid Grid.Column="2">
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>

                <TextBlock Grid.Row="0"
                           Text="{Binding Title}"
                           TextWrapping="Wrap"
                           FontSize="22"
                           Foreground="{StaticResource ForegroundBrush}"
                           FontFamily="Segoe WP Black"
                           Margin="12,6,12,0"
                           TextTrimming="WordEllipsis" />

                <Grid Grid.Row="1">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>

                    <StackPanel Orientation="Horizontal"
                                HorizontalAlignment="Left">
                        <TextBlock Style="{StaticResource PhoneTextNormalStyle}"
                                   Foreground="{StaticResource ForegroundBrush}">
                            <Run Text="Quantité :" />
                            <Run Text="1" />
                        </TextBlock>
                    </StackPanel>

                    <Border Grid.Column="1"
                            HorizontalAlignment="Right"
                            Background="{StaticResource AccentBrushLight}"
                            Padding="5,3"
                            Margin="0,0,-5,-5"
                            VerticalAlignment="Bottom">
                        <TextBlock Text="{Binding Price}"
                                   TextWrapping="Wrap"
                                   Style="{StaticResource PhoneTextLargeStyle}"
                                   Foreground="White"
                                   FontFamily="Segoe WP Black"
                                   FontSize="26.667" />
                    </Border>
                </Grid>
            </Grid>
        </Grid>
    </DataTemplate>

</ResourceDictionary>